package com.fmatos.amazingwallpapers.test.helper;

import java.io.IOException;
import java.io.InputStream;
import java.net.URLConnection;
import java.util.LinkedList;
import java.util.List;

import javax.inject.Singleton;

import org.apache.commons.io.IOUtils;
import org.mockito.Mockito;

import  static org.mockito.Mockito.*;
import android.app.Activity;
import android.content.Context;

import com.fmatos.amazingwallpapers.dagger.AmazingApplication;
import com.fmatos.amazingwallpapers.dagger.TestAmazingApplication;
import com.fmatos.amazingwallpapers.image.network.CloudClient;
import com.fmatos.amazingwallpapers.image.network.CloudHelper;
import com.fmatos.amazingwallpapers.image.network.dto.RemoteAlbumInfo;
import com.fmatos.amazingwallpapers.image.network.dto.RemotePhoto;
import com.fmatos.amazingwallpapers.test.HelloDaggerTest;
import com.fmatos.amazingwallpapers.test.MockedNetworkTest;
import com.google.gson.Gson;

import dagger.Module;
import dagger.Provides;

@Module (
		injects=  { 
			HelloDaggerTest.class,
			MockedNetworkTest.class
		}
) 
public class RobolectricModule  {

	private final AmazingApplication application;
	
	public RobolectricModule(TestAmazingApplication application) {
		this.application = application;
	}

	@Provides @Singleton 
	//	  @ForApplication 
	Context provideApplicationContext() {
		return application;
	}

	@Provides @Singleton
	Activity provideActivity() {
		return application.getCurrentActivity();
	}
	
	@Provides
	CloudHelper provideCloudHelper() {
		return NetworkMocks.buildMockedCloudHelper();
//		return new CloudHelper();
//		return Mockito.mock(CloudHelper.class);
	}


	
}


